package mt

import (
	"cftgo/cftf/boot/app"
	"cftgo/cftf/meta"
	"login/internal/common/mtb"
)

type LoginCluster struct {
	mtb.LoginCluster
}

type LoginClusterTable struct {
	meta.Table[int32, LoginCluster]
	selfConf *LoginCluster
}

func (this *LoginCluster) InstanceInit1() {

}

func (this *LoginClusterTable) GetListenPort() int32 {
	return this.selfConf.GetHttpListenPort()
}

func (this *LoginClusterTable) GetHttpListenPort() int32 {
	return this.selfConf.GetHttpListenPort()
}

func (this *LoginClusterTable) StaticPostInit() {
	this.selfConf = this.GetElement(app.GetInstanceId())
	if this.selfConf == nil {
		panic("imserver集群无法读取本服配置")
	}
}
